package ru.rchervot.sanasar.client.rpc;

import com.google.gwt.user.client.rpc.IsSerializable;

public class GetQuery extends Action implements IsSerializable {
	private Integer queryId;	
	
	public GetQuery() {}
	
	public GetQuery(Integer queryId) {
		this.queryId = queryId;
	}

	public Integer getQueryId() {
		return queryId;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o == null) return false;

		if (! (o instanceof GetQuery)) return false;

		GetQuery to = (GetQuery) o;

		return (queryId == null
				? to.getQueryId() == null
						: queryId.equals(to.getQueryId()) 
						);
	}

	@Override
	public int hashCode() {
		int result = 17;
		result = 37 * result + (queryId == null ? 0 : queryId);
		
		return result;
	}

}
